GNUH8 v0701

February 6th, 2007

KPIT Cummins Infosystems Limited is now releasing GNUH8 v0701, a cross compiler toolchain for

Renesas (formerly Hitachi and Mitsubishi) H8 series of micro controllers.

SALIENT FEATURES:

1.

GNUH8 v0701 is based on gcc-4.2-20061205, binutils-061211, newlib-1.14.0 and gdb-6.6 (released).

2.

Latest patches have been applied to gcc, binutils and newlib sources.

3.  HEW-NTC (version 4.01) that supports integration of GNU toolchains is now 
available on KPIT website.

Please refer to the FAQ for details of the patches applied to the sources.
http://www.kpitgnutools.com/phpmyfaq/index.php?sid=16957&aktion=artikel&rubrik=001005&id=42&lang=en

ABOUT GNUH8 v0701:

Release version: GNUH8 v0701
Release Date: February 1st, 2007
Platforms Supported: Red Hat GNU/Linux v8.0 or later (or compatible distribution)
Windows NT/2000/XP
Language: C, C++
Targets: H8/300, 

H8/300L, 

H8/300H,

H8/300H Tiny Series,

H8/S 2XXX,
H8/S 26XX,
H8/SX
Object File Format: ELF


Please register at http://www.kpitgnutools.com for free technical support.
Please contact http://www.kpitgnutools.com/feedback.php for any feedback or suggestions.

CHANGES IN THIS RELEASE:

BINUTILS:

1. If '.data' section is empty, the '.bss' section follows '.rodata' section instead of following the '.data' section. Due to this, all un-initialized variables are placed in ROM area. However, this can be avoided by modifying the linker script for '.bss' to follow '.data' section by using '_edata' label OR just by declaring a dummy initialized variable that will be placed in the '.data' section.
This bug has been fixed.
2.  Renesas has notified about an error in H8SX CPU data transfer instructions
(MOVMD.B/W/L, MOVSD). This error can occur in two scenarios:

Scenario 1: When the transfer source address "ER5" is set by a load from memory, multiplication or STMAC instruction and followed by a MOVMD or MOVSD
instruction, the number of transfers is incorrectly reduced by 1.

An example would be as follows:

MOV.L @LABEL,ER5
MOVMD.B

Scenario 2: When the transfer destination address "ER6" is set by a load from memory, multiplication or STMAC instruction and followed by a MOVMD.L
instruction, an address error might occur. An example would be as follows:

MOV.L @LABEL,ER6
MOVMD.L

This error does not occur under the following conditions: where ERx is loaded using register direct addressing, where ERx is loaded using an immediate data operand or setting ER5 and ER6 by some other operation; setting the number of transfers to perform in register R4; or by using EEPMOV.B/W instructions instead of the MOVMD/MOVSD instruction.

In v0701 release, the assembler reports the "ER6 set by loading from memory,
followed by MOVMD.L instruction results in address error; Avoid this pattern" error message, when the above mentioned sequence of instructions are encountered. 

The user can also pass the option '--error2warn' to the assembler to generate a warning instead of an error.
3. The linker built-in function LOADADDR(section) was returning sum of LMA and VMA of the named section instead of returning the value of LMA only. 

This problem has been fixed in v0701 release.
4. There is a change in the Linker source of Binutils 2.17 - 20061211 snapshot, used in v0701 release of KPIT toolchains. Due to this change, all the sections in the linker script need to be arranged in the ascending order of their load addresses. Else the linker generates the "dot moved backwards before `.<section-name>'" warning message, where "Dot" refers to the location counter.

GCC:

1.

The following source code, when compiled for H8300, H8300H, H8300HN, H8S, H8300SN, H8SX, H8SXN targets with optimization option "-O1" or above, generates wrong/incomplete assembly instruction for 'jsr'.

unsigned long x[4];

void foo(void)
{
((void (*)())(x+2))();
}

This bug has been fixed.

HEW (For Windows OS only):

1.

HEW-NTC (version 4.01) that supports integration of GNU toolchains is now 
available. For the HEW-NTC installer to automatically detect the GNU toolchains, the HEW-NTC setup and the GNU toolchain installers should be placed in the same folder.

2.

Default workspace created using GNUH8 v0603 toolchain with HEW 4.02.00.022 results in "Error while creating the process" error during dependency scan.
This problem has been fixed in GNUH8 v0701 release. 

 

NOTE: 

 

1.  GNUH8 v0701 toolchain can be used with HEW 4.02.00.022. 
2. GNUH8 v0603 or older version toolchains cannot be used with           HEW 4.02.00.022.
3.

While debugging Linux built applications in HEW 4.01 (or higher), "Open" dialog box pops up many times for every "Step" in the source file.
This problem has been fixed in this release.

4.

Source level debugging in HEW was not possible in case of applications built on Linux using absolute paths.
This problem has been fixed in this release. 

OPTIMIZED LIBRARIES:

1.

The optimized library routine "_subsf3" generated wrong results in some cases.
This bug has been fixed.

 

KNOWN PROBLEMS:

We intend to fix the known problems in our future releases.
We also release Maintenance Packs for critical bugs fixed in between releases.

H8-ELF:

Windows and GNU/Linux:
1.

The following code when compiled for H8300H, H8300HN, H8S, H8300SN, H8SX, H8SXN targets with optimization option -O1 or above, generates wrong assembly code.
unsigned int ReadWordx86Style(unsigned long lAddr)
{
  unsigned char baBuff[2];
  baBuff[0x00]=*((unsigned char *)((unsigned int)(lAddr+1)));
  baBuff[0x01]=*((unsigned char *)((unsigned int)(lAddr+0)));
  return((*(unsigned int *)baBuff));
}

int start(void)
{
  unsigned char baBuff[256];
  unsigned int wResult;
  wResult = ReadWordx86Style((unsigned long)((unsigned int)baBuff));
  return(wResult);

2.

The '.tinybss' implementation does not work as expected.

3.

h8300-elf-as does not give error if attribute of a section is not specified.

4. The functions 'getchar', 'gets' and 'scanf' of NEWLIB and of optimized libraries are not working for H8300HN, H8SN and H8SXN targets. 

HEW (For Windows OS only):

1.

Stack trace information is not available in HEW while debugging applications.

2.

In HEW, when optimized libraries are used in C++ projects, the linker generates "undefined references" error for some routines as some of the ANSI C library functions are not implemented in H8 optimized libraries.

Workaround:
User can add own implementation of these functions or can provide with dummy implementations depending upon the use.

 NOTE:

Windows and GNU/Linux:

1.

The optimized libraries ('liboptm.a' and 'liboptc.a') are not provided under GNU GPL. The source code of the optimized libraries is neither released nor available on request.

2

Latest GDB and simulator provided with this toolchain release must be used with v0701 toolchain.